Popular coding standards in php, such as: psr, zend, pear, and their brackets all have to start another line, which is not very suitable. The editor is Vim, And the syntastic plug-in is used to call phpcs for encoding specification check. Now I want
Save the following as an. xml format"Default"> "Align_key_value_pairs"Value="true"/> "Align_phpdoc_param_names"Value="true"/> "align_phpdoc_comments"Value="true"/> "align_assignments"Value="true"/> "comma_after_last_array_element"Value="true"/>
Learn a little bit of programming every day PDF ebook, video tutorial free download:Http://www.shitanlife.com/codeObjectiveAlthough PHP is the best language in the world, the PHP code written is often not the most beautiful. The reason, may be
Implementation
$ php-cs-fixer fix file --level=psr2 , but not compliance with the PSR2 specifications of several points
!!All PHP source files must end with a blank line.
You cannot have more than one statement on a line.
The length of a
After installing the sublime Text3 under the Mac, some plugins have been installed, including PHP code sniffer, which is referred to as phpcs. Used to prompt for PHP syntax errors. After installation, cannot display, I according to the official
After sublimetext3 is installed in mac, some plug-ins are continuously installed, including phpcodesniffer (phpcs. It is used to prompt php syntax errors. After the installation, it cannot be displayed. According to the prompts on the official
Run $ php-cs-fixerfixfile -- levelpsr2, but it does not comply with the PSR2 specifications !! All PHP source files must end with a blank line. A row cannot contain more than one statement. We do not recommend that you have a hard limit on the
The phpyii framework is used in the project. today, I read the standard documentation github. comyiisoftyiiwikiCore-framework-code-style, which says: The php file only needs to start the label & amp; lt ;? Php do not end the tag? & Amp; gt; It seems
Project to be useful to the PHP yii framework, today read the canonical document
Https://github.com/yiisoft/yii/wiki/Core-framework-code-style
Inside it says: Php file just start tag
不要结束标签 ?>, 印象中好像有看到其他框架也这么说过, 貌似会更安全, 为什么, 哪里有相关介绍?
Reply
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.